import { Animated } from 'react-native'
import { Transform } from '@/taro-yum-common'

function AnimatedView(props) {
  const { style, onClick, animation, children, pointerEvents } = props
  // console.log(animation && animation.transform[0].translateX.__getValue())

  return (
    <Animated.View style={{ ...Transform.styles(style), ...animation }} pointerEvents={pointerEvents} onClick={onClick} className='swipe-action-box'>
      {children}
    </Animated.View>
  )
}

export default AnimatedView
